package com.ship.dispatch.service;

import com.ship.common.business.service.BaseService;
import com.ship.common.core.web.domain.JsonResult;
import com.ship.dispatch.bean.*;
import com.ship.dispatch.bo.HistoryDispatchBO;
import com.ship.dispatch.model.dto.DispatchPotentialSchemeChartSaveDto;
import com.ship.dispatch.model.dto.SchemeChartSellDto;
import com.ship.dispatch.model.dto.SchemeChartSimpleDto;
import com.ship.dispatch.vo.SpDispatchSchemeDetailExVo;

import java.util.List;

/**
 * <p>
 * 年度计划 服务类
 * </p>
 *
 * @author AbyssRabbit@163.com
 * @since 2023-10-17
 */
public interface SpDispatchPotentialService extends BaseService<SpDispatchPotentialScheme> {

    /**
     * 方案甘特图
     * @param dto
     * @return
     */
    JsonResult<SpDispatchPotentialSchemeDetail> getPlanSchemeChart(SchemeChartSimpleDto dto);

    /**
     * 获取方案历史
     * @param historyDispatchBO
     * @return
     */
    JsonResult<List<SpDispatchPotentialSchemeDetail>> getSchemeHistory(HistoryDispatchBO historyDispatchBO);

    /**
     * 方案还原
     * @param schemeId
     * @return
     */
    JsonResult schemeRollback(String schemeId);

    /**
     * 获取方案详情操作历史
     * @param dto
     * @return
     */
    JsonResult<List<SpDispatchPotentialSchemeDetail>> getSchemeDetailHistory(SchemeChartSimpleDto dto);

    /**
     * 获取详情分页详情
     * @param dto
     * @return
     */
    JsonResult<Object> getSchemeDetailPage(SpDispatchPotentialSchemeDetail dto);


    /**
     * 列表和甘特图导出
     * @param spDispatchSchemeDetailExVo
     * @return
     */
    String exportDispatchPlanAndGante(SpDispatchSchemeDetailExVo spDispatchSchemeDetailExVo,String fileUrl);

    /**
     * 读取Base64编码图片
     * @param base64Data
     * @param fileName
     */
    void saveBase64Image(String base64Data, String fileName);

    JsonResult schemeSell(SchemeChartSellDto dto);

    JsonResult<SpDispatchPotentialSchemeDetail> tradingProfitUpdate(SpDispatchPotentialSchemeDetail detail);
}
